<template>
	<view>
		<view class="header-box" @click="jumpPersonal">
			<image :src="photoUrl" mode=""></image>
			<view class="text">
				{{teacher.name}} 老师
			</view>
		</view>
		<view class="content">
			<view class="contentItem">
				<image src="../../static/钱包.png" mode=""></image>
				<view class="contentTxt">
					钱包
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/shoucang.png" mode=""></image>
				<view class="contentTxt">
					收藏
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/文件.png" mode=""></image>
				<view class="contentTxt">
					文件
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/新建日程.png" mode=""></image>
				<view class="contentTxt">
					日程
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/钱包.png" mode=""></image>
				<view class="contentTxt">
					钱包
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/shoucang.png" mode=""></image>
				<view class="contentTxt">
					收藏
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/文件.png" mode=""></image>
				<view class="contentTxt">
					文件
				</view>
			</view>
			<view class="contentItem">
				<image src="../../static/新建日程.png" mode=""></image>
				<view class="contentTxt">
					日程
				</view>
			</view>
		</view>
		<button type="default" @click="exit">退出</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				teacher: {},
				photoUrl: ''
			}
		},
		methods: {
			jumpPersonal() {
				uni.navigateTo({
					url: `../personal/personal`
				})
			},
			exit() {
				uni.clearStorage();
				uni.reLaunch({
					url: '.../login/login'
				})
			}

		},
		onLoad() {
			uni.getStorage({
				key: 'teacher',
				success: res => {
					this.teacher = res.data
				}
			})
			uni.getStorage({
				key: 'photoUrl',
				success: res => {
					this.photoUrl = res.data
				}
			})
		}
	}
</script>

<style scoped>
	page {
		background-color: #F5F5F5;
	}

	.header-box {
		display: flex;
		width: 90%;
		margin: 0 auto;
		margin-top: 20px;
		/* box-shadow: rgb(179 169 169 / 26%) 0px 0px 3px 1px; */
		border-radius: 5px;
		padding: 8px;
		box-sizing: border-box;
	}

	.header-box image {
		height: 140rpx;
		width: 140rpx;
	}

	.text {
		flex: 2;
		text-align: center;
		line-height: 140rpx;
		font-size: 44rpx;
		font-weight: 600;
	}

	.content {
		width: 94%;
		margin: 0 auto;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-around;
	}

	.contentItem {
		width: 46%;
		height: 200rpx;
		padding: 28rpx;
		box-sizing: border-box;
		margin-top: 30rpx;
		border: none;
		outline: none;
		border-radius: 10px;
		font-size: 32rpx;
		font-weight: 600;
		background-color: white;
		/* box-shadow: rgb(179 169 169 / 26%) 0px 0px 3px 1px; */
	}

	.contentTxt {
		margin-top: 10rpx;
	}

	.contentItem image {
		width: 66rpx;
		height: 66rpx;
	}

	button {
		width: 90%;
		margin: 20px auto;

	}
</style>
